%% This is the scoring function we have created for testing purpose.

function [score_a,score_b] = score(team_a,team_b)

        % distance_AB=((move_team_a_X-move_team_b_X)^2+(move_team_a_Y-move_team_b_Y)^2+(move_team_a_Z-move_team_b_Z)^2)^(0.5);
        % shoot_AB =((shoot_team_a_X-move_team_b_X)^2+(shoot_team_a_Y-move_team_b_Y)^2+(shoot_team_a_Z-move_team_b_Z)^2)^(0.5);
        % shoot_BA =((shoot_team_b_X-move_team_a_X)^2+(shoot_team_b_Y-move_team_a_Y)^2+(shoot_team_a_Z-move_team_a_Z)^2)^(0.5);

        distance_AB = sqrt(sum((team_a(:,1)-team_b(:,1)).^2));
        shoot_AB = sqrt(sum((team_a(:,2)-team_b(:,1)).^2));
        shoot_BA = sqrt(sum((team_b(:,2)-team_a(:,1)).^2));

        score_a = (200-distance_AB)/200 + (200-shoot_AB)/200;
        score_b = (200-distance_AB)/200 + (200-shoot_BA)/200;
        % score_team_a = score_team_a + score_a
        % score_team_b = score_team_b + score_b
end